﻿#ifndef DAYINCALENDARFRAGMENT_H
#define DAYINCALENDARFRAGMENT_H

#include "event.h"

#include <QWidget>
#include <QMap>
namespace Ui {
class DayInCalendarFragment;
}

class DayInCalendarFragment : public QWidget {
    Q_OBJECT

public:
    explicit DayInCalendarFragment(QMap<QString,Event> events,int year,int month,int dayNumber,QWidget *parent = nullptr);
    ~DayInCalendarFragment();

private slots:
    void on_pushButton_add_clicked();

    void on_pushButton_del_clicked();

    void on_pushButton_det_clicked();

    void onEventChange(Event eve);

    void bindTimer();
private:
    Ui::DayInCalendarFragment *ui;
    QMap<QString,Event> events;
    int dayNumber,year,month;
    QMap<QString,bool> ringed;
    QTimer timer;
    QString monthName[12] = {tr("Lucky"),tr("Good Day"),tr("Nice Job"),tr("Beautiful"),tr("Wonderful"),tr("Nice"),tr("Great!"),tr("Well done"),tr("Perfect"),tr("Rich day"),tr("Have a rest"),tr("Sound sleep")};
};

#endif // DAYINCALENDARFRAGMENT_H
